import request from '@/utils/request'
export function list(params) {
  return request({
    url: '/admin/shipping/list',
    method: 'get',
    params: params
  })
}

export function find(id) {
  return request({
    url: '/admin/shipping/find/' + id,
    method: 'get'
  })
}

export function complete(id,data,params) {
  return request({
    url: '/admin/shipping/complete/' + id,
    method: 'post',
    data:data,
    params:params
  })
}

export function disComplete(id) {
  return request({
    url: '/admin/shipping/disComplete/' + id,
    method: 'post'
  })
}

export function cancel(id) {
  return request({
    url: '/admin/shipping/cancel/' + id,
    method: 'post'
  })
}
export function received(id) {
  return request({
    url: '/admin/shipping/received/' + id,
    method: 'post'
  })
}

export function reject(id) {
  return request({
    url: '/admin/shipping/reject/' + id,
    method: 'post'
  })
}

export function shipping(id, data,params) {
  return request({
    url: '/admin/shipping/shipping/' + id,
    method: 'post',
    data: data,
    params:params
  })
}
export function updateTrackingNo(id, data) {
  return request({
    url: '/admin/shipping/updateTrackingNo/' + id,
    method: 'post',
    data: data
  })
}

export function dispatch(id, params) {
  return request({
    url: '/admin/shipping/dispatch/' + id,
    method: 'post',
    params: params
  })
}

export function confirm(id, params) {
  return request({
    url: '/admin/shipping/confirm/' + id,
    method: 'post',
    params: params
  })
}

export function exportList(params) {
  return request({
    url: '/admin/shipping/export',
    method: 'get',
    params: params
  })
}

export function batchShipping(data) {
  return request({
    url: '/admin/shipping/batchShipping',
    method: 'post',
    data: data
  })
}

export function print(id) {
  return request({
    url: '/admin/shipping/print?shippingId=' + id,
    method: 'post'
  })
}

// export function exportView(id, params) {
//   return request({
//     url: '/admin/order/export/' + id,
//     method: 'get',
//     params: params
//   })
// }

export function trackingNo_query(params) {
  return request({
    url: '/member/shipping/trackingNo_query',
    method: 'post',
    params: params
  })
}

export function delivery_query(params) {
  return request({
    url: '/member/shipping/delivery_query',
    method: 'post',
    params: params
  })
}

export function orderPlanImport(params) {
  return request({
    url: '/admin/shipping/orderPlanImport',
    method: 'post',
    params: params
  })
}
export function addShippingItem(params) {
  return request({
    url: '/admin/shipping/addShippingItem',
    method: 'post',
    params: params
  })
}
export function delShippingItem(params) {
  return request({
    url: '/admin/shipping/delShippingItem',
    method: 'post',
    params: params
  })
}

export function count(params) {
  return request({
    url: '/admin/shipping/count',
    method: 'get',
    params: params
  })
}

export function otList(params) {
  return request({
    url: '/admin/shipping/otList',
    method: 'get',
    params: params
  })
}

